home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
038a
/
vegx20.zip
/
VGXSPECS.DOC
< prev
next >
Wrap
Text File
|
1990-11-15
|
4KB
|
104 lines
VEGX FILE FORMAT SPECIFICATION
May, 1990
Dwain Goforth
Milestone Software
1260 Sunset Ave.
Arcata, CA 95521
The VEGX file format uses a run-length encoding scheme for each of the
four video banks (or planes.) Like BLOAD, it uses 64k EGA banks; like
PCX, it uses run-length encoding. Each bank is one color attribute (red,
blue, green, intensity). Compressing banks is more efficient than scan
lines - VEGX changes banks only 4 times for each file while PCX changes
1920 times for a VGA 640x480 16-color image (four times each scan line.)
Using VGXLoad or EGXLoad will add approximately 8k to your finished EXE
program. Using VGXSave or EGXSave will add approximately 6k of compiled
code to your EXE program.
In addition to this compiled code, the routines will allocate additional
memory each time they are called.
While running, VGXSave will allocate 78k of RAM, while VGXLoad will
need 56k of RAM. EGXSave allocates about 72k of RAM while EGXLoad
allocates approximately 44k of RAM. Please note that this used RAM
is released after each call (except for the xGXGRAB.COM TSR's which
allocate RAM permanently - until you re-boot your computer.)
Most critical DOS errors are "passed through"; that is, if an error
occurs (filename, disk or memory), the VEGX routines will pass
control back to your program (the call may fail, but your program
will not crash.) However, you do have to have sufficient RAM
available. Remember that speed was the guiding criterion when
designing VEGX. If error catching is essential you will need to use
ON ERROR in your program.
VEGX will work with any IBM-compatible microcomputer with an EGA or
VGA display adapter. DOS 2.1 and above are required. Versions of
Microsoft BASIC supported are QuickBASIC 4.0 - 4.5 and BASIC 6.0 and
BASIC 7.0.
*** Please remember that this is the first release of VEGX. ***
*** Your reporting of bugs or incompatibilities will help me ***
*** improve the product. ***
The VEGX routines are "word-aligned"; that is they are optimized for
the 286 CPU. 8088 CPU machines (PC's and XT's) will work just as
fast, and 386 CPU's will work to nearly as fast as possible.
VGXSave and VGXLoad were written in MASM assembly language and
BASIC itself.
FILE FORMAT:
The first 48 bytes of a VEGX file contain the palette information. Each
of the 16 colors has a byte for red, blue and green, respectively. Thus
byte #1 is the red value for color 0, byte #6 is the green value for color
1, etc...
Following the 48-byte palette header is the compressed bank data. Three
flags (words or 2 bytes) are used to indicate runs or bank changes. These
are:
893E - run of zeros follows
883E - run of ones follows
0F27 - end of bank
The data is stored as words (2 bytes.)
The following is an example of the beginning of a VGX file which has a
custom palette and red circle in the center of the screen:
00 00 00 00 12 13 24 1C 1D 2D 21 1F 3F 2B 1F 3F \
38 20 3F 29 0A 3A 3A 0C 35 26 09 31 13 07 2C 05 > palette header
07 28 02 12 23 01 1B 1C 00 1F 0E 00 1B 06 06 32 /
0F 27 0F 27 89 3E F3 15 01 FF FF C0 89 3E 25 00
skip bank 1 . . . . . .
. . . . . .
skip bank 2 . . . . .
. . . . .
run of zeros next word . .
. . . .
5619 words of zeros (decimal of F315)
. . .
01FF as bit pattern (= 0000000111111111)
. .
FFC0 as bit pattern
.
run of zeros next word
37 words of zeros (dec. of 2500)
00 01 FE 00 00 3F C0 00 89 3E 24 00 00 3E 00 00 etc....
00 00 3E 00 89 3E 24 00 03 C0 00 00 00 00 01 E0
89 3E 24 00 1C 00 00 00 00 00 00 1C 89 3E 24 00...